<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  <meta content="black" name="apple-mobile-web-app-status-bar-style" />
  <meta name="description" content="">
  <meta name="author" content="">
  <title><%= title %></title>
  <link href="/bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
  <link href="/stylesheets/offcanvas.css" rel="stylesheet">
  <link href="/stylesheets/frindex.css" rel="stylesheet"></head>
<body>
  <nav class="navbar navbar-fixed-top navbar-inverse">
    <div class="container">
      <div class="navbar-header">
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
          <span class="sr-only">菜单</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand logobrand" href="/homepage">
          <img src="/images/fish.png" class="img-responsive" alt="Responsive image">
          <span>若鱼日记</span>
        </a>
      </div>
      <div id="navbar" class="collapse navbar-collapse">
        <ul class="nav navbar-nav">
          <li <%if(liFlag == 1){%>class="active"<%}%>>
            <a href="/homepage">首页</a>
          </li>          
          <% if(!loged){ %>
            <li <%if(liFlag == 2){%>class="active"<%}%>>
            <a href="/login">登录</a>
          </li>
          <li <%if(liFlag == 3){%>class="active"<%}%>>
            <a href="/reg">注册</a>
          </li>
          <% }else{ %>
          <li <%if(liFlag == 4){%>class="active"<%}%>>
            <a href="/userPage">我的主页</a>
          </li>
          <li <%if(liFlag == 5){%>class="active"<%}%>>
            <a href="/editPost">写日记</a>
          </li>
          <li <%if(liFlag == 6){%>class="active"<%}%>>
            <a href="/userCenter">账号设置</a>
          </li>
          <li>
            <a href="/logout">退出(<%= user.nickn%>)</a>
          </li>
          <% } %>
        </ul>
      </div>
    </div>
  </nav>
